Computer method and apparatus for automating translation to a modeling language

ABSTRACT

Method and apparatus for automating translation of language specific constructs to UML (Unified Modeling Language) during wizard workflow. The invention provides an integration of UML mapping within the wizards that are available within integrated development environments (IDE&#39;s). As the user specifies the language specific details within a wizard, the appropriate corresponding UML element (depiction) is drawn and displayed within the wizard. This provides a user with an automated visual depiction of his work utilizing UML and yet allows him to work in the programming language of the wizard. Further, this allows the user to learn UML. Other modeling languages may be applied.

BACKGROUND OF THE INVENTION

With the proliferation of software products and services, attempts have been made to codify and/or standardize the designing of software and software architecture. Examples include:

The Booch Method and Modeling Language (see “Object Oriented Analysis and Design” by Grady Booch);

James Rumbaugh and Associates' Object Modeling Technique (OMT);

the Object Oriented Software Engineering (OOSE) method by Ivar Jacobson; and

the Unified Modeling Language (UML) which combines some of the foregoing and industry best practices.

The UML is a visual modeling language (with formal syntax and semantics) for communicating a model or conceptionalization. Thus the modeling language specification specifies modeling elements, notation and usage guidelines and not order of activities, specification of artifacts, repository interface, storage, run-time behavior and so forth. In general, at the modeling level a “problem” is posed in terms of a customer's needs and requirements and may be referred to as the business problem system. The software designer develops a “solution” software product and or service that addresses the problem. The UML syntax enables software designers to express (specify and document) the subject problems and solutions in a standardized manner, while the UML semantics enable knowledge about the subject system to be captured and leveraged during the problem solving phase. See “UML in a Nutshell” by Simon Si Alhir, published by O'Reilly & Associates, September 1998. As such, the UML enables the sharing of information (including prior solution portions) and extension (without reimplementation) of core object oriented concepts (analysis and design) during the iterative problem-solving process for designing software products.

Although UML has proven itself as a way to visualize and model systems—it still is not utilized by all practitioners. For many, once they are familiar with a specific implementation language, it seems difficult to invest additional time learning another language (UML). A solution is needed to lower the investment needed to incorporate UML as part of a user's skillset.

SUMMARY OF THE INVENTION

The present invention addresses the foregoing problems of the prior art. In particular, the present invention provides a computer method and apparatus that automates (and effectively teaches) translation of implementation language-specific constructs to UML (or other modeling language) during wizard workflow.

In a preferred embodiment, the invention method includes:

(a) using a wizard for specifying language-specific constructs in a respective implementation language;

(b) from the wizard, generating code in the respective implementation language;

(c) mapping from the generated code to a modeling language (e.g., UML), and producing, in terms of the modeling language, a depiction of the generated code; and

(d) displaying the produced depiction on screens of the wizard, including displaying updates of the depiction throughout user input into the wizard. Alternatively, displaying is upon user command within or outside of the wizard.

The displaying of the produced depiction and updates thereto, during, throughout and/or outside of the workflow of the wizard, assists the user in learning the modeling language. As such, the present invention provides a method and means (system) for effectively teaching the modeling language to users.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.

FIG. 1 is a block diagram of a preferred embodiment of the present invention.

FIGS. 2 and 3 are schematic views of a Wizard with UML visualization pane in the embodiment of FIG. 1.

FIG. 4 is a schematic illustration of a computer network environment in which embodiments of the present invention may be practiced.

FIG. 5 is a block diagram of a computer of the network of FIG. 4.

DETAILED DESCRIPTION OF THE INVENTION

With the present invention, Applicant provides an integration of UML within the wizards that are available within integrated development environments (IDE's). In the resulting system as the user specifies the language specific details within a wizard, the appropriate UML elements are drawn and displayed for him within the wizard.

The advantage of this solution is that it provides a user with an automated visual depiction of his work utilizing UML and yet allows him to work in the programming language where he has made a learning investment. The positive results of this scenario are that the user consequently and eventually learns UML and is also given a visualization of his work.

For example, when creating an Enterprise JavaBean, a user provides details on a number of aspects of the EJB such as the type of bean, the bean name, the superclass of the bean, the home and remote interfaces, etc. Currently an alternative approach in tools such as XDE, is that the user can draw the solution using UML—and rather than enter the details in the wizard, he would draw the details in a diagram. This requires the user to understand both Java and UML as he needs to translate the concepts that he understands from Java (bean type, superclass, home interface, etc.) into its UML representation. For experienced UML and Java users, this is possible and an acceptable workflow. For those new to UML and unsure of the mapping between UML and Java—it is not a workflow that is likely to lead to success. A user will become frustrated with the lack of automated support describing the mapping between the two languages, and then avoid the usage of UML and just proceed with working in Java. As a result, the user does not learn how to use UML nor does he receive any of the benefits of working with UML.

To encourage wider usage of UML, Applicant ensures that the present invention approach makes it as easy as possible for users to learn UML and the mapping between UML and specific implementation languages. In particular, the present invention provides ways in which the UML necessary to represent a mapping between UML and a specific implementation language is generated automatically for the user. FIGS. 1 through 3 are illustrative.

Illustrated in FIG. 1 is an integrated development environment (IDE) 11 in which the principles of the present invention are implemented. Within IDE 11 are wizards 13 a, b . . . n. Each wizard 13 is directed to a respective implementation language, and as such prompts the user for language specific details (as will be detailed in FIGS. 2 and 3).

Coupled to each wizard 13 is a respective UML language mapper 15. For a given wizard 13, the respective UML language mapper 15 provides the mapping between UML and the respective implementation language of the wizard 13. Example mappers 15 are:

UML and C⁺⁺—see “UML and C⁺⁺: A Practical Guide to Object-Oriented Development,” 2nd Ed. by Richard Lee, William Tepfenhart, November 2000 (Prentice Hall publisher);

UML and Visual Basic—see “Developing Applications with Visual Basic and UML” in the Addison-Wesley Object Technology Series, 1st. Ed., by Paul R. Reed, November 1999 (Addison-Wesley Publishing Co.); and

UML and J2EE—see “Developing Enterprise Java Applications with J2EE and UML,” by Khawar Zaman Ahmed and Cary E. Umrysh, December 2001 (Addison-Wesley Publishing Co.) For a given wizard 13, the wizard 13 prompts the user for language specific details. In turn, the user enters appropriate input with respect to the implementation language supported by the wizard 13. Responsive to this user input, wizard 13 generates code in the respective implementation language. The mapper 15 coupled to wizard 13 receives the generated code and produces a corresponding UML representation of the generated code. That is, mapper 15 translates from the implementation language of the generated code to UML and draws the corresponding UML diagram for the code.

The mapper 15 outputs (displays to the user) the UML diagram corresponding to the wizard generated code in real time, i.e., during user input to and operation of the wizard 13. As a result, the user is provided with an automated visual depiction of his coding work using UML. In a preferred embodiment, the automated visual depiction (in UML) is displayed side by side with the wizard prompts responsible for producing the subject code. FIGS. 2 and 3 are illustrative.

With reference to FIG. 2, when working with a wizard 13 within an IDE 11, a user is presented with a UML visual depiction of the language specific construct that is being specified. The UML visual depiction is preferably displayed in a panel 23 within the wizard screen 21 and is updated in a real-time fashion as the user enters/inputs details within the wizard 13. In the illustrated example, a Java class creation wizard prompts the user for name of the new class, superclass and inheritance (selected by the user). Upon the user typing in “HourlyEmployee” in the name field 25 of the wizard screen 21, the present invention displays in adjacent panel 23 a UML element 31 representing a Java class, with the name “HourlyEmployee”.

As the user specifies some interfaces 27 in the wizard screen 21, the invention system displays in panel 23 the corresponding UML visual depiction of the interface (e.g., “Observable” and “Serializable”) 33 as shown in FIG. 3. Likewise, as the user specifies superclass “ . . . Employee” 29 in wizard screen 21 (with respect to the Java language), the invention system displays in panel 23 the UML diagram updated in real time accordingly. That is, the UML element “Employee” 35 and its class relation to UML element “Hourly Employee 31 ” are depicted in UML terms.

On the last screen of the wizard 13, a final version of the UML diagram is presented summarizing the results of the wizard 13. The user is provided with an option to save the diagram within his project. If during the course of the wizard workflow, the user changes an attribute that has been specified (in the implementation language side), the UML diagram is updated in the UML panel 23 side to reflect the current status of the wizard 13 and its corresponding screens 21. This allows the user to see the impact (in UML terms) of the choices that have been made within the wizard 13. With such visual depiction, side by side and in real time with the wizard language specification, the present invention assists the user in learning UML.

Types of wizards that are currently found include: EJB, Class, Access Bean—and many others. The present invention solution applies to all types of wizards across any programming language that can be represented using UML or a subject modeling language.

FIG. 4 illustrates a computer network or similar digital processing environment in which the present invention may be implemented.

Client computer(s)/devices 50 and server computer(s) 60 provide processing, storage, and input/output devices executing application programs and the like. Client computer(s)/devices 50 can also be linked through communications network 70 to other computing devices, including other client devices/processes 50 and server computer(s) 60. Communications network 70 can be part of a remote access network, a global network (e.g., the Internet), a worldwide collection of computers, Local area or Wide area networks, and gateways that currently use respective protocols (TCP/IP, Bluetooth, etc.) to communicate with one another. Other electronic device/computer network architectures are suitable.

FIG. 5 is a diagram of the internal structure of a computer (e.g., client processor/device 50 or server computers 60) in the computer system of FIG. 4. Each computer 50, 60 contains system bus 80, where a bus is a set of hardware lines used for data transfer among the components of a computer or processing system. Bus 80 is essentially a shared conduit that connects different elements of a computer system (e.g., processor, disk storage, memory, input/output ports, network ports, etc.) that enables the transfer of information between the elements. Attached to system bus 80 is I/O device interface 82 for connecting various input and output devices (e.g., keyboard, mouse, displays, printers, speakers, etc.) to the computer 50, 60. Network interface 86 allows the computer to connect to various other devices attached to a network (e.g., network 70 of FIG. 4). Memory 90 provides volatile storage for computer software instructions (e.g., Program Routines 92 and Data 94) used to implement an embodiment of the present invention as described above. Disk storage 95 provides non-volatile storage for computer software instructions 92 and data 94 used to implement an embodiment of the present invention. Central processor unit 84 is also attached to system bus 80 and provides for the execution of computer instructions.

In one embodiment, the processor routines 92 and data 94 are a computer program product (generally referenced 92), including a computer readable medium (e.g., a removable storage medium such as one or more DVD-ROM's, CD-ROM's, diskettes, tapes, etc.) that provides at least a portion of the software instructions for the invention system. Computer program product 92 can be installed by any suitable software installation procedure, as is well known in the art. In another embodiment, at least a portion of the software instructions may also be downloaded over a cable, communication and/or wireless connection. In other embodiments, the invention programs are a computer program propagated signal product 107 embodied on a propagated signal on a propagation medium (e.g., a radio wave, an infrared wave, a laser wave, a sound wave, or an electrical wave propagated over a global network such as the Internet, or other network(s)). Such carrier medium or signals provide at least a portion of the software instructions for the present invention routines/program 92. In alternate embodiments, the propagated signal is an analog carrier wave or digital signal carried on the propagated medium. For example, the propagated signal may be a digitized signal propagated over a global network (e.g., the Internet), a telecommunications network, or other network. In one embodiment, the propagated signal is a signal that is transmitted over the propagation medium over a period of time, such as the instructions for a software application sent in packets over a network over a period of milliseconds, seconds, minutes, or longer. In another embodiment, the computer readable medium of computer program product 92 is a propagation medium that the computer system 50 may receive and read, such as by receiving the propagation medium and identifying a propagated signal embodied in the propagation medium, as described above for computer program propagated signal product.

Generally speaking, the term “carrier medium” or transient carrier encompasses the foregoing transient signals, propagated signals/medium, storage medium and the like.

While this invention has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.

For example, other modeling languages instead of UML may be the target of translation from the subject programming implementation language. Elements 31, 33, 35 in panel 23 would thus be drawn in that modeling language in a manner similar to that described above for UML.

In another example, the present invention may be employed in an Application Developer for WebSphere Software or the like. In such an embodiment, the user fills out a code focused wizard and can later view the UML depiction by taking the code and adding it to a visualization. The user is able to work in code, and visualize—but the two constructs are not connected during the wizard and the user must choose (make a user command or selection) to see the visualization.

As discussed previously, in certain embodiments of this invention, bringing the visualization into the wizard workflow is preferred. In this other embodiment described in the Application Developer workflow, the user must seek out the UML visualization. In addition, there is no real time connection between the wizard option selections and what is visualized. The user just gets to see (upon user command, for instance) the result of what the code wizard generated. The user can update the code and re-visualize, but again it happens outside of or not so closely coupled to the wizard workflow. 

1. A method for translating language specific constructs to a modeling language, comprising the steps of: providing a mapper, the mapper (i) mapping from code generated in an implementation language to a modeling language, and (ii) producing, in terms of the modeling language, a depiction of the generated code; coupling the mapper to a wizard for specifying language specific constructs in the implementation language, said coupling enabling modeling language depictions to be displayed relative to wizard workflow.
 2. A method as claimed in claim 1 wherein the modeling language is UML; and the step of coupling enables UML depictions to be displayed during wizard workflow.
 3. A method as claimed in claim 1 wherein said enabling modeling language depictions includes: (i) displaying the modeling language depiction during user input into the wizard for specifying a language-specific construct, and (ii) updating the modeling language depiction and displaying the updated depiction during user further input into the wizard.
 4. A method as claimed in claim 3 wherein said displaying and said updating and displaying is in a manner that effectively teaches the modeling language to the user.
 5. A method as claimed in claim 1 wherein said coupling enables modeling language depictions to be displayed as part of screen views of the wizard.
 6. Computer apparatus for translating language specific constructs to a modeling language, comprising: a wizard for specifying language-specific constructs in a respective implementation language; a mapper coupled to receive from the wizard code generated in the implementation language, the mapper producing, in terms of the modeling language, a depiction of the generated code; and display means for displaying the produced depiction throughout screens of the wizard.
 7. Computer apparatus as claimed in claim 6 wherein the modeling language is UML, and the mapper produces UML depictions.
 8. Computer apparatus as claimed in claim 6 wherein the display means further: displays the modeling language depiction during user input into the wizard; and updates the modeling language depiction and displays the updated depiction during user further input into the wizard.
 9. Computer apparatus as claimed in claim 8 wherein the display means displays the modeling language depiction and updated modeling language depiction in a manner that effectively teaches the modeling language to the user.
 10. Computer apparatus as claimed in claim 6 wherein said display means includes a pane embedded in the screens of the wizard.
 11. Computer apparatus as claimed in claim 6 wherein the mapper and display means enable display of the modeling language depiction upon user command within or outside of the wizard.
 12. A carrier medium comprising computer readable code for controlling a processor to translate language-specific constructs to a modeling language, by carrying out the steps of: within a wizard for specifying language-specific constructs in a respective implementation language: (a) obtaining user specifications of a language-specific construct, the user specification being with respect to the respective implementation language; (b) generating code in the respective implementation language in accordance with the user specification; (c) mapping from the generated code to a modeling language, and producing in terms of the modeling language a depiction of the generated code; and (d) displaying the produced depiction in screens of the wizard.
 13. A carrier medium as claimed in claim 12 wherein the modeling language is UML.
 14. A carrier medium as claimed in claim 12 wherein the step of displaying includes: displaying the modeling language depiction during user input into the wizard; and updating the modeling language depiction and displaying the updated depiction during user further input into the wizard.
 15. A carrier medium as claimed in claim 14 wherein said steps of displaying are in a manner that effectively teaches the modeling language to the user.
 16. A carrier medium as claimed in claim 12 wherein the step of displaying includes displaying the produced depiction and updates thereto throughout wizard workflow.
 17. A carrier medium as claimed in claim 12 wherein the step of displaying includes displaying the produced depiction upon user command within or outside of the wizard.
 18. A method for teaching translation from language-specific constructs to a modeling language, comprising the steps of: within a wizard for specifying language-specific constructs in a respective implementation language: (a) obtaining user specifications of a language-specific construct, the user specification being with respect to the respective implementation language; (b) generating code in the respective implementation language in accordance with the user specification; (c) mapping from the generated code to a modeling language, and producing in terms of the modeling language a depiction of the generated code; and (d) displaying the produced depiction in screens of the wizard.
 19. A method as claimed in claim 18 wherein the modeling language is UML.
 20. A method as claimed in claim 18 wherein the step of displaying includes: displaying the modeling language depiction during user input into the wizard; and updating the modeling language depiction and displaying the updated depiction during user further input into the wizard.
 21. A method as claimed in claim 18 wherein the step of displaying includes displaying the produced depiction and updates thereto throughout wizard workflow.
 22. A method as claimed in claim 18 wherein the step of displaying includes displaying the produced depiction upon user command within or outside of the wizard. 